package com.griddroid.messages;

import java.io.Serializable;
import com.griddroid.nodes.GridNode.NodeType;
import com.griddroid.serverdaemons.ClientDaemon;
import com.griddroid.serverdaemons.WorkerDaemon;

/**
 * Requests for a new connection to the server. It contains information about
 * the node that asks for a connection, so that the server can be able to
 * forward this request either to the {@link ClientDaemon ClientDaemon} or the
 * {@link WorkerDaemon WorkerDaemon}
 * 
 * @author Charalampos Mavroforakis
 * @author Thomas Ailianos
 * @author Michail Michailidis
 * 
 */
public class StartSessionRequestMessage extends GenericMessage implements Serializable
{

	private static final long serialVersionUID = 7409782255955223871L;
	private NodeType type;

	public StartSessionRequestMessage(NodeType type)
	{
		this.type = type;
	}

	/**
	 * 
	 * @return the type of the node that asked for a connection
	 */
	public NodeType getType()
	{
		return type;
	}

	public void setType(NodeType type)
	{
		this.type = type;
	}
}
